<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>订单列表</h3></div>
                <div class="fr">
                    <form class="search-form" method="post" action="">
                        <span>查询条件:</span>
                        <select name="field">
                            <option value="name" <if condition="$filter.field eq 'name'">selected="selected"</if>>姓名</option>
                            <option value="phone" <if condition="$filter.field eq 'phone'">selected="selected"</if>>电话</option>
                            <option value="wxgzh" <if condition="$filter.field eq 'wxgzh'">selected="selected"</if>>公众号名称</option>
                            <option value="state" <if condition="$filter.field eq 'state'">selected="selected"</if>>支付状态</option>
                            <option value="no" <if condition="$filter.field eq 'no'">selected="selected"</if>>订单编号</option>
                        </select>
                        <input name="value" value="{$filter.value}" type="text" placeholder="输入关键字按回车" />
                        <input name="page" value="{$filter.page}" type="hidden" />
                        <input name="order_field" value="{$filter.order_field}" type="hidden" />
                        <input name="order_sort" value="{$filter.order_sort}" type="hidden" />
                        <button class="btn-normal" type="submit">查 询</button>
                    </form>
                </div>
            </div>
            <div class="line2">
                <div class="fl form-btn-group">
                    <button disabled="disabled" class="btn-save btn-disable">新 建</button>
                </div>
                <div class="fl form-btn-more">
                    <button class="btn-normal btn-more">更多操作<i class="drop-down"></i></button>
                    <ul class="more-action hidden">
                        <in name="$x|default='01-01-02'" value="$rightsCode">
                            <li><a onclick="action_export();" href="javascript:void(0);">导 出</a></li>
                            <li><a onclick="action_del();" href="javascript:void(0);">删 除</a></li>
                        </in>
                    </ul>
                </div>
                <div class="fr form-search-count">
                    <span class="offset">({$page.from}-{$page.to})</span>
                    <span class="total">共{$page.total}条</span>
                    <button onclick="PageJump({$page.prevPage});" class="btn-normal">上一页</button>
                    <button onclick="PageJump({$page.nextPage});" class="btn-normal">下一页</button>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box">
        <table class="list">
            <thead>
                <tr>
                    <th width="3%"><input id="select-all" type="checkbox" /></th>
                    <th class="list-header" field="no" sort="{$filter.order_sort}">
                        ID<if condition="$filter.order_field eq 'no'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th class="list-header" field="no" sort="{$filter.order_sort}">
                        域名<if condition="$filter.order_field eq 'no'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th class="list-header" field="service" sort="{$filter.order_sort}">
                        订单号<if condition="$filter.order_field eq 'service'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="wxgzh" sort="{$filter.order_sort}">
                        公众号名称<if condition="$filter.order_field eq 'wxgzh'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="name" sort="{$filter.order_sort}">
                        申请人姓名<if condition="$filter.order_field eq 'name'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="phone" sort="{$filter.order_sort}">
                        联系手机<if condition="$filter.order_field eq 'phone'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="phone" sort="{$filter.order_sort}">
                        QQ<if condition="$filter.order_field eq 'phone'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="phone" sort="{$filter.order_sort}">
                        所在地区<if condition="$filter.order_field eq 'phone'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="ctime" sort="{$filter.order_sort}">
                        申请用途<if condition="$filter.order_field eq 'ctime'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="state" sort="{$filter.order_sort}">
                        申请类型<if condition="$filter.order_field eq 'state'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="ptime" sort="{$filter.order_sort}">
                        终端类型<if condition="$filter.order_field eq 'ptime'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="ptime" sort="{$filter.order_sort}">
                        付款金额<if condition="$filter.order_field eq 'ptime'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="ptime" sort="{$filter.order_sort}">
                        是否付款<if condition="$filter.order_field eq 'ptime'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="ptime" sort="{$filter.order_sort}">
                        支付单号<if condition="$filter.order_field eq 'ptime'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                    <th field="ptime" sort="{$filter.order_sort}">
                        申请时间<if condition="$filter.order_field eq 'ptime'"><i class="icon-{$filter.order_sort}"></i></if>
                    </th>
                </tr>
            </thead>
            <tbody>
                <volist name="list" id="vo" key="index">
                    <tr class="dingdan-info" offset="{$vo.offset}" data-id="{$vo.id}">
                        <td class="checkbox-cell"><input class="checkbox" data-id="{$vo.id}" type="checkbox" /></td>
                        <td>{$vo.id}</td>
                        <td>{$vo.refer}</td>
                        <td>{$vo.no}</td>
                        <td>{$vo.wxgzh}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.phone}</td>
                        <td>{$vo.qq}</td>
                        <td>{$vo.province}-{$vo.city}-{$vo.area}</td>
                        <td>{$vo.purpose}</td>
                        <td>{$vo.service}</td>
                        <td>{$vo.client}</td>
                        <td>{$vo.money}</td>
                        <td>{$vo.state}</td>
                        <td>{$vo.payid}</td>
                        <td>{$vo.ctime}</td>
                    </tr>
                </volist>
            </tbody>
        </table>
    </div>
</div>
<script>
    //导出excel
    function action_export() {
        var dataIds = new Array();
        $(".checkbox").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
            if($(this).is(":checked")){
                dataIds.push( parseInt($(this).attr("data-id")));
            }
        });

        var context = fn_GetContext();
        context.ids = dataIds.join();
        context.field = $("select[name=field]").val();

        var url = "";
        for(var k in context){
            url += k + "=" + context[k] + "&";
        }
        location.href = '/admin/dingdan/export?' + url;
    }
</script>
<script src="__JS__/dingdan.js?v=0.2" type="text/javascript" ></script>
<include file="Public:footer" />

